package com.woniuxy.dao;

import com.woniuxy.entity.Product;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @Author: 邓宇昂
 * @Do: 继承jpa
 * @DateTime: 22/05/30/0030 下午 12:07
 * @Component: 成都蜗牛学苑
 **/
public interface ProductDao extends JpaRepository<Product,Integer> {
    //这个方法，是用户自定义的查询方法，相当于 where name = 'xx' or price between minPrice and maxPrice
    List<Product> findByNameOrPriceBetween(String name, double minPrice, double maxPrice);
}